#ifndef _SEARCHTREE_H
#define _SEARCHTREE_H

#define ElementType2 int
struct _treeNode;
typedef struct _treeNode TreeNode;
typedef struct _treeNode* SearchTree;
typedef void (*DisplayFunc)(ElementType2);

void DisposeSearchTree(SearchTree);
TreeNode* FindMax(SearchTree);
TreeNode* FindMin(SearchTree);
TreeNode* Find(SearchTree, ElementType2);
SearchTree Insert(SearchTree, ElementType2);
SearchTree DeleteEle(SearchTree, ElementType2);
void Empty(SearchTree);
void TestSearchTree();
void PreOrder(SearchTree, DisplayFunc);
void InOrder(SearchTree, DisplayFunc);
void PostOrder(SearchTree, DisplayFunc);
void LevelOrder(SearchTree, DisplayFunc);
void Display2(ElementType2);

#endif

/*
#以下为测试本数据结构的MakeFile文件：

# 每次编译指点修改OTHERH和OTHERC变量即可
OTHERH=SearchTree.h
OTHERC=SearchTree.c

OTHERH2=Queue1.h
OTHERC2=Queue1.c

main: main.o other.o other2.o
        gcc -o main main.o other.o other2.o
        ./main

main.o:

other.o: $(OTHERC) $(OTHERH)
        gcc -c $(OTHERC) -o $@

other2.o: $(OTHERC2) $(OTHERH2)
        gcc -c $(OTHERC2) -o $@


clean:
        rm -f main *.o

run:
        make
        ./main
*/